import { defineFakeRoute } from "vite-plugin-fake-server/client";
export default defineFakeRoute([
  /** 用户筛选列表 */
  {
    url: "/index/user",
    method: "get",
    response: () => {
      return {
        err: { code: 0, err: "" },
        result: {
          unitname: [
            "南方医科大学南方医院",
            "暨南大学",
            "中国人民解放军陆军军医大学第二附属医院"
          ],
          rpgname: ["石敏", "基础医学院 - 洪健", "肿瘤科朱波课题组"]
        },
        status: { code: 200, msg: "请求成功" }
      };
    }
  },
  /** 用户搜索 */
  {
    url: "/user",
    method: "post",
    response: ({ body }) => {
      if (body.key === "石敏") {
        return {
          result: {
            data: [
              {
                userid: 1712489428,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              }
            ],
            total: 1
          }
        };
      } else {
        return {
          result: {
            data: [
              {
                userid: 1712489428,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489429,
                useremail: "1151777410@qq.com",
                unitname: "广东省科学院生态环境与土壤研究所",
                rpgname: "袁再健团队",
                qq: "sm1106",
                phone: "1151777410",
                enable: true,
                username: "靳鹏斐",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489430,
                useremail: "1207743097@qq.com",
                unitname: "南方医科大学",
                rpgname: "黄巧冰组-基础医学院",
                qq: "1207743097",
                phone: "15622727508",
                enable: true,
                username: "刘转华",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489431,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489432,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏2",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489433,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏3",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489434,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏4",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489435,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏5",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489436,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏6",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489437,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏7",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              },
              {
                userid: 1712489438,
                useremail: "sm1106@gmail.com",
                unitname: "南方医科大学南方医院",
                rpgname: "石敏8",
                qq: "sm1106",
                phone: "13416379812",
                enable: true,
                username: "石敏",
                point: 20,
                lastlogintime: "2024-04-16T16:55:53+08:00"
              }
            ],
            total: 11
          }
        };
      }
    }
  }
]);
